import request from '@/utils/request'

/**
 * 分页
 */
export function order_page(params) {
  return request({
    url: '/api/order/pagination',
    method: 'post',
    data: params
  })
}

/**
 * 详情
 */
export function order_detail(params) {
  return request({
    url: `/api/order/${params.id}`,
    method: 'get',
    data: params
  })
}

/**
 * 接单
 */
export function order_receive(params) {
  return request({
    url: `/api/order/receive/${params.id}`,
    method: 'put',
    data: params
  })
}

/**
 * 拒接
 */
export function order_reject(params) {
  return request({
    url: `/api/order/reject/${params.id}`,
    method: 'put',
    data: params.content
  })
}
